package group.rober.base.controller;

import group.rober.saber.holder.WebHolder;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ModelAttribute;

@ControllerAdvice
public class BaseControllerAdvice {
    @ModelAttribute
    public void addAttributes(Model model){
        model.addAttribute("ctxPath", WebHolder.getServletContext().getContextPath());
        model.addAttribute("viewPath","/views");

    }
}
